package com.wbp.cms.client.project.domain;

import java.util.Date;
import java.util.List;
import com.google.common.collect.Lists;
import com.wbp.cms.client.common.BaseDO;
import com.wbp.cms.client.util.DateUtils;
/**
 * 预约项目
 * @Description: 
 * @Department:
 * @author andy.lhc
 * @date 2016年3月6日 下午10:07:17 
 */
public class ProjectDO  extends BaseDO {

  /**
   * 
   */
  private static final long serialVersionUID = -3537629529175102177L;

  private Long id;

  private Date createTime;

  private String createTimeDesc ="";
  
  private Date updateTime;
  
  private String projectName ; // 项目名称(从产品名称中取值)
  
  private Long  productId ;
  
  private String idCard ;
  
  private String  mobileNumber ;
  
  private  Long  customerId ;
  
  private String customerName ;
  
  private  int  reserveType ; // 预约类型;1:客户自签,2:上门面签
  private String reserveTypeDesc ;
  
  private int type ;
  private String typeDesc ;
  
  private  String  paymoneyDate ; // 预计打款时间 
  
  private  String  instruction ; // 说明 
  
  private  double  preAmount =0.0d; // 预约(认购)金额,单位万
 
  private Long  userId ;   // 推荐人user_id
  
  private String userName ;
  
  private  double   userProjectPercentage ; //  推荐人项目提成比例%   BigDecimal
  
  private  int  userProjectCommission ; // 推荐人项目提成佣金,单位分
   
  private  int  status ; // 当前状态；1：申请合同;2:审核通过已寄出合同  
  private String statusDesc ;
  
  private  String  benefitPerson ; // 受益人 
  
  private String  txtBank  ; // 汇款银行
 
  private  String txtAccount ; // 银行尾号
   
  private  String  expectedProfit ; // 预期收益,单位百分比% 
  
  private  Date  createDate  ; // 成立日期 
  
  private  Date  endDate ; // 清算日期
  
  private  String  logisticsNumberCustomer ; //  项目合同快递单号,公司寄给客户，company2customer
  
  private String  logisticsNumberCompany ; // 项目合同快递单号,客户寄回公司，customer2compay
  
  private  String  tipMessage ; // 用户提示信息 
  
  private String companyName ;
  
  private String legalPerson ;
  
  private int version ;
  
  private ContractDO  contract ;
  
  private List<ProjectProfitDO>  projectProfitList ; 
  
  private List<ProjectWorkOrderDO>  projectWorkOrderList ;

  private String comments ;
  
  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public Date getCreateTime() {
    return createTime;
  }

  public void setCreateTime(Date createTime) {
    this.createTime = createTime;
    
    if(this.createTime!=null ){
      this.setCreateTimeDesc(DateUtils.format(this.createTime, DateUtils.DEFAULT_DATETIME_FORMAT_NO_SECOND) ) ;
    }
    
  }

  public String getCreateTimeDesc() {
    return createTimeDesc;
  }

  public void setCreateTimeDesc(String createTimeDesc) {
    this.createTimeDesc = createTimeDesc;
  }

  public Date getUpdateTime() {
    return updateTime;
  }

  public void setUpdateTime(Date updateTime) {
    this.updateTime = updateTime;
  }

  public String getProjectName() {
    return projectName;
  }

  public void setProjectName(String projectName) {
    this.projectName = projectName;
  }

  public Long getProductId() {
    return productId;
  }

  public void setProductId(Long productId) {
    this.productId = productId;
  }

  public String getUserName() {
    return userName;
  }

  public void setUserName(String userName) {
    this.userName = userName;
  }

  public String getIdCard() {
    return idCard;
  }

  public void setIdCard(String idCard) {
    this.idCard = idCard;
  }

  public String getMobileNumber() {
    return mobileNumber;
  }

  public void setMobileNumber(String mobileNumber) {
    this.mobileNumber = mobileNumber;
  }

  public Long getCustomerId() {
    return customerId;
  }

  public void setCustomerId(Long customerId) {
    this.customerId = customerId;
  }

  public int getReserveType() {
    return reserveType;
  }

  public void setReserveType(int reserveType) {
    this.reserveType = reserveType;
  }

  public String getPaymoneyDate() {
    return paymoneyDate;
  }

  public void setPaymoneyDate(String paymoneyDate) {
    this.paymoneyDate = paymoneyDate;
  }

  public String getInstruction() {
    return instruction;
  }

  public void setInstruction(String instruction) {
    this.instruction = instruction;
  }

  public double getPreAmount() {
    return preAmount;
  }

  public void setPreAmount(double preAmount) {
    this.preAmount = preAmount;
  }

  public Long getUserId() {
    return userId;
  }

  public void setUserId(Long userId) {
    this.userId = userId;
  }

  public double getUserProjectPercentage() {
    return userProjectPercentage;
  }

  public void setUserProjectPercentage(double userProjectPercentage) {
    this.userProjectPercentage = userProjectPercentage;
  }

  public int getUserProjectCommission() {
    return userProjectCommission;
  }

  public void setUserProjectCommission(int userProjectCommission) {
    this.userProjectCommission = userProjectCommission;
  }

  public int getStatus() {
    return status;
  }

  public void setStatus(int status) {
    this.status = status;
  }

  public String getBenefitPerson() {
    return benefitPerson;
  }

  public void setBenefitPerson(String benefitPerson) {
    this.benefitPerson = benefitPerson;
  }

  public String getTxtBank() {
    return txtBank;
  }

  public void setTxtBank(String txtBank) {
    this.txtBank = txtBank;
  }

  public String getTxtAccount() {
    return txtAccount;
  }

  public void setTxtAccount(String txtAccount) {
    this.txtAccount = txtAccount;
  }

  public String getExpectedProfit() {
    return expectedProfit;
  }

  public void setExpectedProfit(String expectedProfit) {
    this.expectedProfit = expectedProfit;
  }

  public Date getCreateDate() {
    return createDate;
  }

  public void setCreateDate(Date createDate) {
    this.createDate = createDate;
  }

  public Date getEndDate() {
    return endDate;
  }

  public void setEndDate(Date endDate) {
    this.endDate = endDate;
  }

  public String getLogisticsNumberCustomer() {
    return logisticsNumberCustomer;
  }

  public void setLogisticsNumberCustomer(String logisticsNumberCustomer) {
    this.logisticsNumberCustomer = logisticsNumberCustomer;
  }

  public String getLogisticsNumberCompany() {
    return logisticsNumberCompany;
  }

  public void setLogisticsNumberCompany(String logisticsNumberCompany) {
    this.logisticsNumberCompany = logisticsNumberCompany;
  }

  public String getTipMessage() {
    return tipMessage;
  }

  public void setTipMessage(String tipMessage) {
    this.tipMessage = tipMessage;
  }

  public int getVersion() {
    return version;
  }

  public void setVersion(int version) {
    this.version = version;
  }

  public ContractDO getContract() {
    return contract;
  }

  public void setContract(ContractDO contract) {
    this.contract = contract;
  }

  public List<ProjectProfitDO> getProjectProfitList() {
    return projectProfitList;
  }

  public void setProjectProfitList(List<ProjectProfitDO> projectProfitList) {
    this.projectProfitList = projectProfitList;
  }

  public List<ProjectWorkOrderDO> getProjectWorkOrderList() {
    return projectWorkOrderList;
  }

  public void setProjectWorkOrderList(List<ProjectWorkOrderDO> projectWorkOrderList) {
    this.projectWorkOrderList = projectWorkOrderList;
  } 
  
  public String getCustomerName() {
    return customerName;
  }

  public void setCustomerName(String customerName) {
    this.customerName = customerName;
  }

  public void  addProjectProfit(ProjectProfitDO  projectProfit){
    if(projectProfitList == null)
       projectProfitList =Lists.newArrayList() ;
    if(!projectProfitList.contains(projectProfit))
       projectProfitList.add(projectProfit) ;
  }
  
  public  void  addProjectWorkOrder(ProjectWorkOrderDO   projectWorkOrder){
     if(projectWorkOrderList == null)
         projectWorkOrderList = Lists.newArrayList() ;
     if( !projectWorkOrderList.contains(projectWorkOrder) )
         projectWorkOrderList.add(projectWorkOrder) ;
  }

  public String getComments() {
    return comments;
  }

  public void setComments(String comments) {
    this.comments = comments;
  }

  public int getType() {
    return type;
  }

  public void setType(int type) {
    this.type = type;
  }

  public String getCompanyName() {
    return companyName;
  }

  public void setCompanyName(String companyName) {
    this.companyName = companyName;
  }

  public String getLegalPerson() {
    return legalPerson;
  }

  public void setLegalPerson(String legalPerson) {
    this.legalPerson = legalPerson;
  }

  public String getReserveTypeDesc() {
    return reserveTypeDesc;
  }

  public void setReserveTypeDesc(String reserveTypeDesc) {
    this.reserveTypeDesc = reserveTypeDesc;
  }

  public String getTypeDesc() {
    return typeDesc;
  }

  public void setTypeDesc(String typeDesc) {
    this.typeDesc = typeDesc;
  }

  public String getStatusDesc() {
    return statusDesc;
  }

  public void setStatusDesc(String statusDesc) {
    this.statusDesc = statusDesc;
  } 
  
}
